
<%@ page import="com.FluxoCaixa"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="layout" content="main" />
<g:set var="entityName"
	value="${message(code: 'fluxoCaixa.label', default: 'FluxoCaixa')}" />
<title><g:message code="default.show.label" args="[entityName]" /></title>
</head>
<body>
	<div class="nav">
		<span class="menuButton"><a class="home"
			href="${createLink(uri: '/')}"><g:message
					code="default.home.label" /></a></span> <span class="menuButton"><g:link
				class="list" action="list">
				<g:message code="default.list.label" args="[entityName]" />
			</g:link></span> <span class="menuButton"><g:link class="create"
				action="create">Novo Fluxo de Caixa</g:link></span>
	</div>

	<h1 id="pageName">Mostra FluxoCaixa</h1>
	<g:if test="${flash.message}">
		<div class="message">
			${flash.message}
		</div>
	</g:if>
	<table class="IadTableShow">
		<tbody>

			<tr class="prop">
				<td valign="top" class="name"><g:message
						code="fluxoCaixa.id.label" default="Id" /></td>

				<td valign="top" class="value">
					${fieldValue(bean: fluxoCaixaInstance, field: "id")}
				</td>

				<td valign="top"><g:myReport arquivo="report1"
						titulo="${fluxoCaixaInstance.nomeFluxo}" format="PDF" /></td>

			</tr>

			<tr class="prop">
				<td valign="top" class="name"><g:message
						code="fluxoCaixa.dataInicial.label" default="Data Inicial" /></td>

				<td valign="top" class="value"><g:formatDate
						date="${fluxoCaixaInstance?.dataInicial}" /></td>

			</tr>

			<tr class="prop">
				<td valign="top" class="name"><g:message
						code="fluxoCaixa.dataFinal.label" default="Data Final" /></td>

				<td valign="top" class="value"><g:formatDate
						date="${fluxoCaixaInstance?.dataFinal}" /></td>

			</tr>
			<tr class="prop">
				<td class="value" style="font-size: 18px; color: #025647; font-weight: bold;">
				Saldo Inicial:
				 </td>
				<td class="value">
					${fluxoCaixaInstance.saldoInicial}
				</td>
			</tr>

		</tbody>
	</table>

	<table class="IadTableList">
		<tbody>
			<tr>
				<td class="value"
					style="font-size: 18px; color: #025647; font-weight: bold;">
					1-ENTRADA</td>
				<td class="value"
					style="font-size: 15px; text-align: right; color: #025647; font-weight: bold;">
					${fluxoCaixaInstance.saldoEntrada}
				</td>
			</tr>

			<g:each in="${fluxoCaixaInstance.contasReceber}" var="c">
					<tr>
						<td class="value"
							style="font-size: 15px; text-indent: 4em; color: #13601F;">
							${c.dataBaixa}
						</td>
						<td class="value"
							style="font-size: 15px; text-align: center; color: #13601F;">
							${c.valor}
						</td>
					</tr>
			</g:each>
			
			<tr>
				<td class="value"
					style="font-size: 18px; color: #025647; font-weight: bold;">
					2-SAIDA</td>
				<td class="value"
					style="font-size: 15px; text-align: right; color: #025647; font-weight: bold;">
					${fluxoCaixaInstance.saldoSaida}
				</td>
			</tr>

			<g:each in="${fluxoCaixaInstance.contasPagar}" var="c">
					<tr>
						<td class="value"
							style="font-size: 15px; text-indent: 4em; color: #13601F;">
							${c.dataBaixa}
						</td>
						<td class="value"
							style="font-size: 15px; text-align: center; color: #13601F;">
							${c.valor}
						</td>
					</tr>
			</g:each>
			
			<tr>
				<td class="value"
					style="font-size: 18px; color: #025647; font-weight: bold;">
					3-SALDO</td>
				<td class="value"
					style="font-size: 15px; text-align: right; color: #025647; font-weight: bold;">
					${fluxoCaixaInstance.saldoFinal}
				</td>
			</tr>
			
		</tbody>
	</table>
	
	


	<div class="buttons">
		<g:form>
			<g:hiddenField name="id" value="${fluxoCaixaInstance?.id}" />
			<span class="button"><g:actionSubmit class="edit"
					action="edit"
					value="${message(code: 'default.button.edit.label', default: 'Edit')}" /></span>
			<span class="button"><g:actionSubmit class="delete"
					action="delete"
					value="${message(code: 'default.button.delete.label', default: 'Delete')}"
					onclick="return confirm('${message(code: 'default.button.delete.confirm.message', default: 'Are you sure?')}');" /></span>
		</g:form>
	</div>
</body>
</html>
